package com.wmx.colone;

public class CloneTest {
    public static void main(String[] args) {
        StudentClone studentClone = new StudentClone();
        studentClone.setAge(1);
        studentClone.setName("wumengxin");

        System.out.println(studentClone.toString());
        try {
            StudentClone studentClone1  =(StudentClone) studentClone.clone();

            studentClone1.setName("李红");
            studentClone1.setAge(20);
            System.out.println(studentClone1.toString());
            System.out.println(studentClone.toString());

        }catch (Exception e){


        }

    }
}
